<!DOCTYPE HTML>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <title>Edit Artist</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
<body>
<h2>Edit an Artist:</h2>
<form th:action="@{/editArtist}" method= "post" th:object="${artist}">
    <input type="hidden" id="id" th:name="id" th:value="*{id}"/>
    <input type="text" id="name" placeholder="Name" th:name="name"/>
    <input type="text" id="country" placeholder="Country" th:name="country"/>
    <input type="text" id="age" placeholder="Age" th:name="age"/>
    <input type="submit" value="Edit Artist"/>
    <h3>Delete Genre</h3>
    <div class="form-select-button" th:each="oldGenre : ${oldGenres}">
        <input type="checkbox" name="oldGenreIdList" th:value="${oldGenre.id}"/>
        <label th:text="${oldGenre.name}"></label>
    </div>
    <br><br>
    <h3>Add Genre</h3>
    <div class="form-select-button" th:each="genre : ${genres}">
        <input type="checkbox" name="genreIdList" th:value="${genre.id}"/>
        <label th:text="${genre.name}"></label>
    </div>
    <br><br>
</form>
</body>
</html>